Skip to content

fix(schematic): respect intentional unconnected pins - #267

Open
nordic-style wants to merge 1 commit into
mixelpixx:mainfrom
nordic-style:codex/fix/component-connection-pin-types
Open

fix(schematic): respect intentional unconnected pins#267
nordic-style wants to merge 1 commit into
mixelpixx:mainfrom
nordic-style:codex/fix/component-connection-pin-types

Conversation

@nordic-style

@nordic-style nordic-style commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Summary

Stop validate_component_connections from reporting intentionally unconnected symbol pins and pins belonging to other units, and make its existing ignore_power_pins option effective.

Refs #182

Root cause and approach

The validator used the unit-agnostic pin extractor, discarded each library pin's electrical type, and never read ignore_power_pins. As a result it superimposed pins from other units and treated declared no-connect and optionally ignored power pins as missing connections.

  • Preserve each embedded library pin's KiCad electrical type.
  • Exempt pins typed no_connect and ordinary pins carrying a schematic no-connect marker.
  • Honor ignore_power_pins for power_in and power_out pins.
  • Use the existing unit-aware extractor so a placed unit does not inherit another unit's pins.
  • Add pin_type to each finding and clarify the public tool description.

This keeps the smaller #267 framing selected by the maintainer. #280 is now closed as its duplicate. #272 continues to cover the other analysis/export/review paths.

Compatibility and safety

The request schema is unchanged. Findings gain an additive pin_type field. Results intentionally stop containing library-declared NC pins, ignored power pins, and pins from unplaced units.

The validator is read-only and does not alter the schematic.

Validation

After rebasing this one-commit PR onto current main (2183267), all commands required by CONTRIBUTING.md pass on this exact branch:

  • cargo test --workspace --locked --lib --tests
  • cargo test --workspace --locked --doc
  • cargo clippy --workspace --locked --all-targets -- -D warnings
  • cargo fmt --all -- --check

Live-GUI tests remain intentionally ignored by the upstream suite unless a running KiCad GUI/socket is supplied.

Risk and rollback

The main behavioral risk is filtering a pin that should still be reported. Regression tests cover declared NC pins, schematic no-connect markers, power filtering, selected units, and mid-wire junction behavior. Rollback is a single focused commit.

@mixelpixx

Copy link
Copy Markdown
Owner

This and #280 add the identical ignore_power_pins filter to validate_component_connections — same lines, two different issue framings. See the series note on #285: please keep one. My preference is this one (#182 framing, smaller diff), with #280 reduced to whatever non-duplicate remainder it has after rebasing on #272.

The component validator reported pins declared no-connect, ignored its public power-pin option, and projected every unit's pins through each placed unit. Preserve KiCad electrical types, honor the filter, exempt explicit and intrinsic no-connect pins, and resolve only the selected unit.

Refs mixelpixx#182
@nordic-style
nordic-style force-pushed the codex/fix/component-connection-pin-types branch from 2de4473 to 86e8019 Compare August 23, 2026 13:16
@nordic-style

Copy link
Copy Markdown
Contributor Author

Resolved as requested: I kept the smaller #267 implementation, closed #280 as its duplicate, rebased this one-commit branch onto current main, and replaced the combined-series validation claim with a full PR-specific run. All four CONTRIBUTING.md commands pass; GitHub CI is running on the rebased head.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants